﻿using System;
using System.Windows.Forms;
using TestSystem.Model.Data.Repositories;

namespace TestSystem.Ui.Forms
{
    public partial class ImportForm : Form
    {
        public ImportForm()
        {
            InitializeComponent();
        }

        private void ImportForm_Load(object sender, EventArgs e)
        {
            radioButton1.Checked = true;
            comboBox1.Enabled = false;
            var tools = new ToolsRepository();
            foreach (var tool in tools.FindAll())
                    comboBox1.Items.Add(tool.Name + " (" + tool.Description + ")" );
           
        }

        private void radioButton1_Click(object sender, EventArgs e)
        {
            comboBox1.Enabled = false;
            label1.Enabled = true;
            label2.Enabled = true;
        }

        private void radioButton2_Click(object sender, EventArgs e)
        {
            comboBox1.Enabled = true;
            label1.Enabled = false;
            label2.Enabled = false;
        }
    }
}
